/**
 *   属性组件的通用mixin
 * 1. props接收2个对象
 *    a. config 当前组件对应的属性配置
 *    b. data: 组件的属性数据
 */

import type { PropType } from "vue";
import type { TypeAttrCmpProtocal } from "@/types/TypeDesign";
import { defineComponent } from "vue";

export default defineComponent({
  props: {
    config: {
      type: Object as PropType<TypeAttrCmpProtocal>,
      default: () => {},
      required: true,
    },
    data: {
      //当前组件的所有属性
      type: Object as () => Record<string, any>,
      default: () => {},
      required: true,
    },
  },
});
